package smedi.ismedi.mobile.bff.controller.qualityteam;


import com.smedi.ismedi.qualityteam.dto.request.subject.SubjectProcessRequest;
import com.smedi.ismedi.qualityteam.dto.response.subject.SubjectResponse;
import com.smedi.ismedi.qualityteam.feign.RemoteSubjectProcessFeignApi;
import com.smedi.ismedi.web.starter.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import smedi.ismedi.mobile.bff.controller.BaseController;

/**
 * @Author nyl
 * @Date 2021/6/17 9:40
 */
@Api(tags = {"活动课题接口"})
@Slf4j
@RequestMapping(value = "/mobilebff/v1/subject")
@RestController
@RequiredArgsConstructor
public class SubjectProcessController extends BaseController {
    private final RemoteSubjectProcessFeignApi remoteSubjectProcessFeignApi;

    /**
     * 活动课题 审批
     *
     * @param subjectProcessRequest
     * @return
     */
    @ApiOperation(value = "活动课题 审批", nickname = "活动课题 审批")
    @PostMapping(value = "/approval")
    ResponseData<SubjectResponse> approvalSubject(@Validated @RequestBody SubjectProcessRequest subjectProcessRequest) {

        return remoteSubjectProcessFeignApi.approvalSubject(subjectProcessRequest);
    }
}
